class RequestQueueItem {
public:
	inline RequestQueueItem() : m_poConnectionHandler(NULL), m_poRequest(NULL) {};

	inline RequestQueueItem(const RequestQueueItem& oSrc) : m_poConnectionHandler(NULL), m_poRequest(NULL) {
		copyFrom(oSrc);
	}

	inline ~RequestQueueItem() {
		RefObject::releaseAndClear(m_poConnectionHandler);
		RefObject::releaseAndClear(m_poRequest);
	}

	inline void operator = (const RequestQueueItem& oSrc) {
		copyFrom(oSrc);
	}

	inline void setConnectionHandler(ConnectionHandler* poConnectionHandler) {
		RefObject::setNewRefObject(m_poConnectionHandler, poConnectionHandler);
	}

	inline ConnectionHandler* getConnectionHandler() const {
		return m_poConnectionHandler;
	}

	inline void setRequest(INetworkCommand* poRequest) {
		RefObject::setNewRefObject(m_poRequest, poRequest);
	}

	inline INetworkCommand* getRequest() const {
		return m_poRequest;
	}

protected:
	inline void copyFrom(const RequestQueueItem& oSrc) {
		setConnectionHandler(oSrc.getConnectionHandler());
		setRequest(oSrc.getRequest());
	}
protected:

	ConnectionHandler* m_poConnectionHandler;
	INetworkCommand* m_poRequest;
};

